As known in the art, a “stackable switch” is a network switch that can operate independently as a standalone device or in concert with one or more other stackable switches in a “stack” or “stacking system.” FIG. 1A illustrates the front face of an exemplary stackable switch 100 according to an embodiment. As shown, stackable switch 100 includes a set of data ports 102, a set of stacking ports 104, and a console port 106. Data ports 102 are operable for connecting stackable switch 100 to one or more hosts and/or data networks. Stacking ports 104 are operable for linking stackable switch 100 to other stackable switches in the same stacking system/topology. Stacking ports 104 can be dedicated ports (i.e., ports designed specifically for stacking) or high bandwidth data uplink ports that operate in a stacking mode. Console port 106 is operable for accessing the management console of stackable switch 100 in order to perform various device management functions.
FIG. 1B illustrates an exemplary stacking system 150 according to an embodiment. As shown, stacking system 150 comprises a number of stackable switches 152, 154, and 156 (each similar to stackable switch 100 of FIG. 1A) that have been linked together via their respective stacking ports. In the example of FIG. 1B, stackable switches 152, 154, and 156 form a ring topology. In addition, stackable switch 154 is designated as the “master” switch of stacking system 150, which means that switch 154 serves as the point of user contact for all management functions of system 150. For instance, stackable switch 154 can accept and process user commands directed to the overall configuration of stacking system 150. Stackable switch 154 can also communicate with non-master switches 152 and 156 as needed in order to propagate various types of management commands and data to those switches.
One aspect of configuring and operating a stacking system such as system 150 of FIG. 1B involves assigning unique identifiers (known as “device IDs” or “unit IDs”) to the stackable switches in the system. These identifiers allow an administrator to precisely identify each stackable switch in order to configure the switch and its respective ports. Generally speaking, only the master switch in a stacking system will have a predefined device ID; non-master switches will not. Accordingly, it is necessary to assign device IDs to the non-master switches when they are added to the stacking system (e.g., at the time of constructing the stack or replacing one or more existing switches in the stack) so they may be properly identified/configured.
In existing stacking systems, there are typically four options for assigning device IDs: (1) manually assigning a device ID to a given switch via the switch's console port; (2) manually entering the serial number for each non-master switch in the master switch so that the master switch can assign device IDs based on the serial numbers; (3) presenting an interactive UI to an administrator that displays the system's topology and asks the administrator to enter a device ID for each switch; and (4) executing an algorithm that “guesses” appropriate device IDs based on certain metrics. Unfortunately, each of these options suffers from certain drawbacks. For example, option (1) requires an administrator or technician to physically connect a terminal to the console port of each stackable switch in order to set the switch's device ID. In a large data center that has hundreds or thousands of stackable switches (of which only a portion may be connected to console terminals), this approach is too cumbersome to be practical.
Option (2) (i.e., manually entering serial numbers into the master switch) is highly error-prone. For instance, it is quite common to mis-transcribe characters in a long serial number string. Further, the task of collecting switch serial numbers can be challenging because such numbers are typically printed on the backside or underside of each switch. These locations are not easily accessible in many environments, such as data centers where switches are mounted into racks or other similar structures.
Option (3) addresses some of the issues of options (1) and (2) since it allows an administrator to enter device IDs via an interactive UI on the master switch, without having to physically access the non-master switches. However, some environments include many identical stacking systems that need to be configured similarly. In these scenarios, the administrator may prefer a mechanism for easily applying the same device ID configuration to all stacking systems, rather than running though the interactive UI for each individual stack.
Finally, option (4) (i.e., the “best guess” algorithm) is problematic because the algorithm involves computing all possible device ID permutations in a stacking system and ranking the permutations according to various metrics in order to arrive at a device ID assignment. For stacks with a moderate to large number of switches, this can result in a very large number of permutations, to the point where the algorithm cannot be feasibly run on existing hardware (there are ways to reduce the number of permutations based on switch order in linear or ring topologies, but these optimizations cannot be used for more complex topologies such as generalized meshes). Further, even if the algorithm is able to generate a device ID assignment for a given stacking system, the resulting device IDs may not be consistent with what the administrator has in mind, and thus may need to be reassigned using one of the other options mentioned above.